<template>
	<view>
		<u-picker 
			:show="show" 
			:columns="columns" 
			:keyName="keyName"
			confirmColor="var(--theme-color)"
			@close="close"
			@confirm="confirm">
		</u-picker>
	</view>
</template>

<script>
	export default {
		props: {
			show: {
				type: Boolean,
				default: false,
			},
			columns:{
				type:[Array,Object],
				default: ()=>[],
			},
			keyName:{
				type: String,
				default: '',
			}
		},
		data() {
			return {

			};
		},
		created() {
			console.log(this.keyName)
		},
		methods:{
			close(){
				this.$emit('pickerPopup',{type:'colse',data:0})
			},
			confirm(e){
				this.$emit('pickerPopup',{type:'confirm',data:e.value[0]})
			},
		}
	}
</script>

<style lang="less" scoped>

</style>
